﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Wallpaper.Models.Entities
{
    public class Permission:BaseEntity
    {
        public string MenuId { get; set; }        // 所属菜单
        public string Name { get; set; }          // 权限名称，如“用户新增”
        public string Code { get; set; }          // 权限编码，如 system:user:add
        public int Sort { get; set; }
        /// <summary>
        /// 软删除标志：true-已删除，false-正常
        /// </summary>
        public bool IsDeleted { get; set; }


        public DateTime CreatedAt { get; set; }

        public DateTime? UpdatedAt { get; set; }

        public Menu Menu { get; set; }
        public ICollection<RolePermission> RolePermissions { get; set; } = new List<RolePermission>();
    }

}
